package com.group7.mall.req;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class UserCommentPageRequest {

    private Integer goodsId;

    private Long pageNo = 1L;

    private Long pageSize = 10L;

    private Integer commentSort;

    private Integer commentType = 0;

    private Integer havingAppendedComment = 0;

    private Integer havingImage;

    private Long pageStart;

    // 升序、降序
    private String sortRule = "desc";

    // 好评、中评、差评、带图、追评
    private String sortField = "comment_value";

    public Long getPageNo() {
        if(pageNo < 1L || pageNo == null) {
            return 1L;
        }
        return pageNo;
    }

    public Long getPageSize() {
        if(pageSize < 1L) {
            return 10L;
        }
        return pageSize;
    }
}
